function *gen(){
  let gen11 = yield gen1()
  console.log(gen11)
  let gen22 = yield gen2()
  console.log(gen22)
  let gen33 = yield gen3()
  console.log(gen33)
}
let iterator = gen()




function gen1(){
  setTimeout(()=>{
    let data = 'gen1'
    iterator.next(data)
  },1000)
}

function gen2(){
  setTimeout(()=>{
    let data = 'gen2'
    iterator.next(data)
  },1000)
}
function gen3(){
  setTimeout(()=>{
    let data = 'gen3'
    iterator.next(data)
  },1000)
}

iterator.next()



